#!/usr/bin/env bash
# Copyright (c) 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT

archs=(rmallos2 rm1os3)
pkgnames=(open-remarkable-shutdown)
pkgdesc="Use remarkable-splash to display shutdown and reboot images"
url=https://github.com/ddvk/remarkable-splash
pkgver=1.0-3
timestamp=2022-02-28T00:12Z
section="utils"
maintainer="Eeems <eeems@eeems.email>"
license=MIT
installdepends=(remarkable-splash)

source=(
    remarkable-shutdown-override.conf
    remarkable-reboot-override.conf
)
sha256sums=(
    SKIP
    SKIP
)

package() {
    install -D -m 644 -t "$pkgdir"/etc/systemd/system/remarkable-shutdown.service.d "$srcdir"/remarkable-shutdown-override.conf
    install -D -m 644 -t "$pkgdir"/etc/systemd/system/remarkable-reboot.service.d "$srcdir"/remarkable-reboot-override.conf
}

configure() {
    systemctl daemon-reload
}

postremove() {
    systemctl daemon-reload
}
